package test.dp.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class Main {

	public static void main(String[] args) {
		Server conServer = new ConcertServer();
		
		InvocationHandler proxyHandler = new DynamicHandler(conServer);
		
		Server serverProxy = (Server)Proxy.newProxyInstance(Main.class.getClassLoader(), new Class[]{Server.class}, proxyHandler);
		
		serverProxy.request();
	}
}
